***Syntax Zero-sum thinking and the cultural threat of Muslim immigrants' religious rights 
***Study 2

**Recoding experiments
keep if survey_ending=="complete" /*keep participants who finished surevy*/

*Canteen experiment
encode schnitzel_experiment, gen(schnitzel_experiment_n4)
encode treat_schnitzel, gen(treat_schnitzel_n)
recode schnitzel_experiment_n4 (3=.) (5=0) (2=.33) (1=.66) (4=1)
label define schnitzel_experiment_n4 0"Fully against" 1"Fully in favor", modify
label values schnitzel_experiment_n4 schnitzel_experiment_n3

gen additional=0
recode additional (0=1) if treat_schnitzel_n>3 
label define additional3 0"zero-sum" 1"non-zero-sum"
label values additional additional3

*Reason: 0=general, 1=climate, 2=Muslims
gen reason=0
recode reason (0=1) if treat_schnitzel_n==2 | treat_schnitzel_n==6 | treat_schnitzel_n==7 
recode reason (0=2) if treat_schnitzel_n==3 | treat_schnitzel_n==8 | treat_schnitzel_n==9
label define reason 0"General" 1"Climate" 2"Muslims"
label value reason reason

gen cost=0
recode cost (0=1) if treat_schnitzel_n==5 | treat_schnitzel_n==7 | treat_schnitzel_n==9


*Holiday experiments
encode religious_holidays, gen(religious_holidays_n)
encode treat_rel_holiday_1, gen(treat_rel_holiday_1_n)
encode treat_rel_holiday_2, gen(treat_rel_holiday_2_n)

gen religious_holidays_new4=religious_holidays_n
recode religious_holidays_new4 (3=.) (5=0) (2=.33) (1=.66) (4=1)
label define religious_holidays_new4 0"Fully against"  1"Fully in favor", modify
label values religious_holidays_new4 religious_holidays_new4

gen muslimday=1
recode muslimday (1=0) if treat_rel_holiday_1_n==1
label define muslimday 0"Women's Day" 1"Muslim Holiday"
label value muslimday muslimday


*Change/effects 0=nothing, 1=positive, 2=negative, 3=less christian
gen change=0
recode change (0=1) if treat_rel_holiday_2_n==1
recode change (0=2) if treat_rel_holiday_2_n==2
recode change (0=3) if treat_rel_holiday_2_n==3

gen change2=0
recode change2 (0=1) if treat_rel_holiday_2_n==3
label define change2 0"non-zero-sum" 1"zero-sum"
label value change2 change2

gen change3=1
recode change3 (1=0) if treat_rel_holiday_2_n==3
label define change3 1"non-zero-sum" 0"zero-sum"
label value change3 change3



**Main covariates
*IMCP
encode impc_1, gen(imcp_1_n) 
encode impc_2, gen(imcp_2_n)
encode impc_3, gen(imcp_3_n)
encode impc_4, gen(imcp_4_n)

gen imcp_1_new=imcp_1_n
recode imcp_1_new (1 7=.) (5=1) (2=2) (6=3) (3=4) (4=5)
label define imcp_1_new 1 "Fully disagree" 2 "Partly disagree"  3 "neither"  4 "Partly agree"   5 "Fully agree"
label values imcp_1_new imcp_1_new

gen imcp_2_new=imcp_2_n
recode imcp_2_new (1 7=.) (5=1) (2=2) (6=3) (3=4) (4=5)
label define imcp_2_new 1 "Fully disagree" 2 "Partly disagree"  3 "neither"  4 "Partly agree"   5 "Fully agree"
label values imcp_2_new imcp_1_new

gen imcp_3_new=imcp_1_n
recode imcp_3_new (1 7=.) (5=1) (2=2) (6=3) (3=4) (4=5)
label define imcp_3_new 1 "Fully disagree" 2 "Partly disagree"  3 "neither"  4 "Partly agree"   5 "Fully agree"
label values imcp_3_new imcp_1_new

gen imcp_4_new=imcp_1_n
recode imcp_4_new (1 7=.) (5=1) (2=2) (6=3) (3=4) (4=5)
label define imcp_4_new 1 "Fully disagree" 2 "Partly disagree"  3 "neither"  4 "Partly agree"   5 "Fully agree"
label values imcp_4_new imcp_1_new

alpha imcp_1_new imcp_2_new imcp_3_new imcp_4_new, gen(imcp_all)

gen imcp_dich=.
recode imcp_dich (.=1) if imcp_all>3
recode imcp_dich (.=0) if imcp_all<3
label define imcp_dich 0"Low IMCP" 1"High IMCP"
label value imcp_dich imcp_dich 


**Analyses
*Table A3: Mean values acceptance rates canteen experiment, study 2
mean schnitzel_experiment_n4, over(additional)
mean schnitzel_experiment_n4 if reason==1, over(additional)
mean schnitzel_experiment_n4 if reason==2, over(additional)
mean schnitzel_experiment_n4 if imcp_dich==0 & reason==1, over(additional)
mean schnitzel_experiment_n4 if imcp_dich==0 & reason==2, over(additional)
mean schnitzel_experiment_n4 if imcp_dich==1 & reason==1, over(additional)
mean schnitzel_experiment_n4 if imcp_dich==1 & reason==2, over(additional)


*Table A4: Mean values acceptance rates holidays experiment, study 2
mean religious_holidays_new4, over(change3)
mean religious_holidays_new4 if muslimday==0, over(change3)
mean religious_holidays_new4 if muslimday==1, over(change3)
mean religious_holidays_new4 if imcp_dich==0 & muslimday==0, over(change3)
mean religious_holidays_new4 if imcp_dich==0 & muslimday==1, over(change3)
mean religious_holidays_new4 if imcp_dich==1 & muslimday==0, over(change3)
mean religious_holidays_new4 if imcp_dich==1 & muslimday==1, over(change3)


*Table A7: Regression analyses canteen experiment, study 2
preserve
keep if reason!=0
reg schnitzel_experiment_n4 additional imcp_all 
outreg2 using schnitzel.doc, replace
reg schnitzel_experiment_n4 additional imcp_all if reason==1
outreg2 using schnitzel.doc, append
reg schnitzel_experiment_n4 additional imcp_all if reason==2
outreg2 using schnitzel.doc, append
reg schnitzel_experiment_n4 additional##i.reason c.imcp_all##i.reason
outreg2 using schnitzel.doc, append

reg schnitzel_experiment_n4 additional##c.imcp_all
outreg2 using schnitzel.doc, append
reg schnitzel_experiment_n4 additional##c.imcp_all if reason==1
outreg2 using schnitzel.doc, append
reg schnitzel_experiment_n4 additional##c.imcp_all if reason==2
outreg2 using schnitzel.doc, append
reg schnitzel_experiment_n4 additional##c.imcp_all##i.reason
outreg2 using schnitzel.doc, append
restore

*Table A8: Regression analyses holiday experiment, study 2
reg religious_holidays_new4 change3 imcp_all
outreg2 using religious_holidays.doc, replace
reg religious_holidays_new4 change3 imcp_all if muslimday==0
outreg2 using religious_holidays.doc, append
reg religious_holidays_new4 change3 imcp_all if muslimday==1
outreg2 using religious_holidays.doc, append
reg religious_holidays_new4 change3##muslimday c.imcp_all##muslimday
outreg2 using religious_holidays.doc, append

reg religious_holidays_new4 change3##c.imcp_all
outreg2 using religious_holidays.doc, append
reg religious_holidays_new4 change3##c.imcp_all if muslimday==0
outreg2 using religious_holidays.doc, append
reg religious_holidays_new4 change3##c.imcp_all if muslimday==1
outreg2 using religious_holidays.doc, append
reg religious_holidays_new4 change3##c.imcp_all##muslimday
outreg2 using religious_holidays.doc, append

